package com.wing.cabinet.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.cabinet.model.entity.StoresRequisition;
import com.wing.cabinet.model.request.StoresRequisitionForm;
import com.wing.cabinet.model.request.StoresRequisitionProductForm;
import com.wing.cabinet.model.request.TakeDeliveryForm;
import com.wing.cabinet.model.response.StoresRequisitionVO;
import com.wing.common.utils.JsonResult;
import com.wing.order.model.response.InventoryInoutJobVO;

import java.util.List;
import java.util.Map;

/**
 * 领新申请表-Service
 *
 * @author
 */
public interface StoresRequisitionService extends IService<StoresRequisition> {

    /**
     * 添加
     *
     * @param storesRequisitionForm
     * @return
     */
    int add(StoresRequisitionForm storesRequisitionForm);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<StoresRequisitionVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<StoresRequisitionVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    StoresRequisitionVO get4appById(Long id);

    IPage<StoresRequisitionVO> getStoresRequisitionVOPageList(StoresRequisitionVO storesRequisitionVO,StoresRequisition.CheckStatus checkStatus,
                                                              StoresRequisition.Status status,Integer page, Integer limit);

    /**
     * 添加
     *
     * @param storesRequisitionForm
     * @return
     */
    void submitStoresRequisitionForm(StoresRequisitionForm storesRequisitionForm);

    void submitGetRequisitionProduct(TakeDeliveryForm takeDeliveryForm);

    /**
     * 查询领新申请单和领取产品数据
     * @param storesRequisitionId
     * @return
     */
    StoresRequisitionVO getWorkOrderInfo(Long storesRequisitionId);

    /**
     * 领新申请产品记录和修改状态
     * @param storesRequisitionId
     * @param productList
     */
    void requisitionProductRecord(Long storesRequisitionId, List<StoresRequisitionProductForm> productList);

    JsonResult<String> sendTest(String mailTo);
}
